#!/usr/bin/env bash

# Hyperparameters search

base_path='./experiments/audiovisual_train_test'

results_path='results'
mkdir -p ${base_path}'/'${results_path}
split=1

# # basic settings
# python main.py --gpu_devices 0,1 --batch_size 128 --n_threads 12 \
#     --no_scheduler \
#     --no_test \
#     --attn_dropout 0.0 \
#     --out_dropout 0.0 \
#     --lr_transformer 1e-3 \
#     --use_selfAtt \
#     --use_transformer \
#     --num_heads 4 \
#     --result_path results_hype_000 \
#     --nlevels 5 \
#     --audiovisual True --checkpoint 10 --n_epochs 10 \
#     --root_path ${base_path} \
#     --pretrain_path ./data/pretrained_models/stavis_visual_only/visual_split${split}_save_60.pth  \
#     --audio_pretrain_path ./data/pretrained_models/soundnet8.pth \
#   	--annotation_path_coutrot1_train ./data/fold_lists/Coutrot_db1_list_train_${split}_fps.txt \
#   	--annotation_path_coutrot1_test ./data/fold_lists/Coutrot_db1_list_test_${split}_fps.txt \
#   	--annotation_path_coutrot2_train ./data/fold_lists/Coutrot_db2_list_train_${split}_fps.txt \
#   	--annotation_path_coutrot2_test ./data/fold_lists/Coutrot_db2_list_test_${split}_fps.txt \
#   	--annotation_path_summe_train ./data/fold_lists/SumMe_list_train_${split}_fps.txt \
#   	--annotation_path_summe_test ./data/fold_lists/SumMe_list_test_${split}_fps.txt \
#   	--annotation_path_etmd_train ./data/fold_lists/ETMD_av_list_train_${split}_fps.txt \
#   	--annotation_path_etmd_test ./data/fold_lists/ETMD_av_list_test_${split}_fps.txt \
#   	--annotation_path_avad_train ./data/fold_lists/AVAD_list_train_${split}_fps.txt \
#   	--annotation_path_avad_test ./data/fold_lists/AVAD_list_test_${split}_fps.txt
#
# # lr 1e-2
# python main.py --gpu_devices 0,1 --batch_size 128 --n_threads 12 \
#     --no_scheduler \
#     --no_test \
#     --attn_dropout 0.0 \
#     --out_dropout 0.0 \
#     --lr_transformer 1e-2 \
#     --use_selfAtt \
#     --use_transformer \
#     --num_heads 4 \
#     --result_path results_hype_001 \
#     --nlevels 5 \
#     --audiovisual True --checkpoint 10 --n_epochs 10 \
#     --root_path ${base_path} \
#     --pretrain_path ./data/pretrained_models/stavis_visual_only/visual_split${split}_save_60.pth  \
#     --audio_pretrain_path ./data/pretrained_models/soundnet8.pth \
#   	--annotation_path_coutrot1_train ./data/fold_lists/Coutrot_db1_list_train_${split}_fps.txt \
#   	--annotation_path_coutrot1_test ./data/fold_lists/Coutrot_db1_list_test_${split}_fps.txt \
#   	--annotation_path_coutrot2_train ./data/fold_lists/Coutrot_db2_list_train_${split}_fps.txt \
#   	--annotation_path_coutrot2_test ./data/fold_lists/Coutrot_db2_list_test_${split}_fps.txt \
#   	--annotation_path_summe_train ./data/fold_lists/SumMe_list_train_${split}_fps.txt \
#   	--annotation_path_summe_test ./data/fold_lists/SumMe_list_test_${split}_fps.txt \
#   	--annotation_path_etmd_train ./data/fold_lists/ETMD_av_list_train_${split}_fps.txt \
#   	--annotation_path_etmd_test ./data/fold_lists/ETMD_av_list_test_${split}_fps.txt \
#   	--annotation_path_avad_train ./data/fold_lists/AVAD_list_train_${split}_fps.txt \
#   	--annotation_path_avad_test ./data/fold_lists/AVAD_list_test_${split}_fps.txt


# lr 1e-4
python main.py --gpu_devices 0,1 --batch_size 128 --n_threads 12 \
    --no_scheduler \
    --no_test \
    --attn_dropout 0.0 \
    --out_dropout 0.0 \
    --lr_transformer 1e-4 \
    --use_selfAtt \
    --use_transformer \
    --num_heads 4 \
    --result_path results_hype_002 \
    --nlevels 5 \
    --audiovisual True --checkpoint 10 --n_epochs 10 \
    --root_path ${base_path} \
    --pretrain_path ./data/pretrained_models/stavis_visual_only/visual_split${split}_save_60.pth  \
    --audio_pretrain_path ./data/pretrained_models/soundnet8.pth \
  	--annotation_path_coutrot1_train ./data/fold_lists/Coutrot_db1_list_train_${split}_fps.txt \
  	--annotation_path_coutrot1_test ./data/fold_lists/Coutrot_db1_list_test_${split}_fps.txt \
  	--annotation_path_coutrot2_train ./data/fold_lists/Coutrot_db2_list_train_${split}_fps.txt \
  	--annotation_path_coutrot2_test ./data/fold_lists/Coutrot_db2_list_test_${split}_fps.txt \
  	--annotation_path_summe_train ./data/fold_lists/SumMe_list_train_${split}_fps.txt \
  	--annotation_path_summe_test ./data/fold_lists/SumMe_list_test_${split}_fps.txt \
  	--annotation_path_etmd_train ./data/fold_lists/ETMD_av_list_train_${split}_fps.txt \
  	--annotation_path_etmd_test ./data/fold_lists/ETMD_av_list_test_${split}_fps.txt \
  	--annotation_path_avad_train ./data/fold_lists/AVAD_list_train_${split}_fps.txt \
  	--annotation_path_avad_test ./data/fold_lists/AVAD_list_test_${split}_fps.txt


# no self attention /lr 1e-2 /attn_dropout 0.1/num_heads 2/nlevels 3
python main.py --gpu_devices 0,1 --batch_size 128 --n_threads 12 \
    --no_scheduler \
    --no_test \
    --attn_dropout 0.1 \
    --out_dropout 0.0 \
    --lr_transformer 1e-2 \
    --use_transformer \
    --num_heads 2 \
    --result_path results_hype_003 \
    --nlevels 3 \
    --audiovisual True --checkpoint 10 --n_epochs 10 \
    --root_path ${base_path} \
    --pretrain_path ./data/pretrained_models/stavis_visual_only/visual_split${split}_save_60.pth  \
    --audio_pretrain_path ./data/pretrained_models/soundnet8.pth \
  	--annotation_path_coutrot1_train ./data/fold_lists/Coutrot_db1_list_train_${split}_fps.txt \
  	--annotation_path_coutrot1_test ./data/fold_lists/Coutrot_db1_list_test_${split}_fps.txt \
  	--annotation_path_coutrot2_train ./data/fold_lists/Coutrot_db2_list_train_${split}_fps.txt \
  	--annotation_path_coutrot2_test ./data/fold_lists/Coutrot_db2_list_test_${split}_fps.txt \
  	--annotation_path_summe_train ./data/fold_lists/SumMe_list_train_${split}_fps.txt \
  	--annotation_path_summe_test ./data/fold_lists/SumMe_list_test_${split}_fps.txt \
  	--annotation_path_etmd_train ./data/fold_lists/ETMD_av_list_train_${split}_fps.txt \
  	--annotation_path_etmd_test ./data/fold_lists/ETMD_av_list_test_${split}_fps.txt \
  	--annotation_path_avad_train ./data/fold_lists/AVAD_list_train_${split}_fps.txt \
  	--annotation_path_avad_test ./data/fold_lists/AVAD_list_test_${split}_fps.txt


# no self attention /lr 1e-2 /attn_dropout 0.1/num_heads 8/nlevels 5
python main.py --gpu_devices 0,1 --batch_size 128 --n_threads 12 \
    --no_scheduler \
    --no_test \
    --attn_dropout 0.1 \
    --out_dropout 0.0 \
    --lr_transformer 1e-2 \
    --use_transformer \
    --num_heads 8 \
    --result_path results_hype_004 \
    --nlevels 5 \
    --audiovisual True --checkpoint 10 --n_epochs 10 \
    --root_path ${base_path} \
    --pretrain_path ./data/pretrained_models/stavis_visual_only/visual_split${split}_save_60.pth  \
    --audio_pretrain_path ./data/pretrained_models/soundnet8.pth \
  	--annotation_path_coutrot1_train ./data/fold_lists/Coutrot_db1_list_train_${split}_fps.txt \
  	--annotation_path_coutrot1_test ./data/fold_lists/Coutrot_db1_list_test_${split}_fps.txt \
  	--annotation_path_coutrot2_train ./data/fold_lists/Coutrot_db2_list_train_${split}_fps.txt \
  	--annotation_path_coutrot2_test ./data/fold_lists/Coutrot_db2_list_test_${split}_fps.txt \
  	--annotation_path_summe_train ./data/fold_lists/SumMe_list_train_${split}_fps.txt \
  	--annotation_path_summe_test ./data/fold_lists/SumMe_list_test_${split}_fps.txt \
  	--annotation_path_etmd_train ./data/fold_lists/ETMD_av_list_train_${split}_fps.txt \
  	--annotation_path_etmd_test ./data/fold_lists/ETMD_av_list_test_${split}_fps.txt \
  	--annotation_path_avad_train ./data/fold_lists/AVAD_list_train_${split}_fps.txt \
  	--annotation_path_avad_test ./data/fold_lists/AVAD_list_test_${split}_fps.txt

# # no self attention/no att mask /lr 1e-2 /attn_dropout 0.1/num_heads 8/nlevels 5
# python main_train_one_dataset.py --gpu_devices 0,1 --batch_size 128 --n_threads 12 \
#     --no_test \
#     --attn_dropout 0.1 \
#     --out_dropout 0.0 \
#     --lr_transformer 1e-2 \
#     --use_transformer \
#     --num_heads 8 \
#     --result_path results_hype_04 \
#     --nlevels 5 \
#     --audiovisual True --checkpoint 10 --n_epochs 10 \
#     --root_path ${base_path} \
#     --pretrain_path ./data/pretrained_models/resnet-50-kinetics.pth  \
#     --audio_pretrain_path ./data/pretrained_models/soundnet8.pth \
# 	  --annotation_path_av_train ./data/fold_lists/AVD_list_train_fps.txt \
#     --annotation_path_av_test ./data/fold_lists/AVD_list_test_fps.txt \
#     --attn_mask
